/*
 * Runge-Kutta_4.c
 *
 *  Created on: 05/09/2013
 *      Author: joserobertosteiner
 */

#include <math.h>
#include <stdlib.h>

double func_pt(double pt){
	return pt;
}

double func_phi(double phi, double theta){
	double aux;
	aux = sin(theta)*sin(theta);

	return phi/aux;
}

double func_ptheta(double pphi, double phi, double theta, double mx, double my, double mz){

	double aux;
	aux = pphi*pphi*cos(theta)/(pow(sin(theta), 3));

	return aux + mx*cos(theta)*sin(phi) + my*cos(theta)*sin(phi) - mz*sin(theta);
}

double func_pphi( double phi, double theta, double mx, double my){
	return -mx*sin(theta)*sin(phi) + my*sin(theta)*cos(phi);
}

